/**
 * 
 */
package com.antilia.infomaresme.data.services;

import java.io.Serializable;
import java.util.List;

import com.antilia.infomaresme.data.dataobjects.ImageInfo;
import com.antilia.infomaresme.data.dataobjects.Item;

/**
 * @author Ernesto
 *
 */
public interface IImageService extends Serializable {

	List<ImageDetail> getImageDetails(Item item);
	
	/**
	 * Resizes a image (mainly to create thumbnails).
	 * @param imageDetail
	 * @param width
	 * @param height
	 * @return
	 */
	ImageDetail resizeImage(ImageDetail imageDetail, int width, int height);
	
	/**
	 * Stores the image represxented by {@link ImageInfo} whose bytes are passed on <code>image</code>
	 * 
	 * @param imageInfo
	 * @param image
	 * @return
	 */
	ImageDetail storeImage(ImageInfo imageInfo, Item item, byte[] image);
	
	/**
	 * Deletes the image an any thumbnails associated.
	 * @param imageInfo
	 * @return
	 */
	boolean deleteImage(ImageInfo imageInfo, Item  item);
	
	ImageDetail getImageDetail(ImageInfo imageInfo, Item  item);
	
}
